package com.scs.application.modules.wm.service;

import com.scs.application.core.service.IBaseService;
import com.scs.application.modules.wm.dto.TraceBackDTO;
import com.scs.application.modules.wm.entity.Stock;
import com.scs.application.modules.wm.entity.WorkOrder;
import com.scs.application.modules.wm.entity.WorkOrderItem;

import java.util.List;

/**
 * <p>
 *  Service
 * </p>
 */

public interface WorkOrderService extends IBaseService<WorkOrder> {
    /**
     * 出入库过账
     * @param workOrderId:工单ID
     *
     */
    // void post(String workOrderId);

    /**
     * 批量出入库过账   一次只能处理一种类型出库集合
     * @param workOrderIds:工单ID集合
     *
     */
    void postBatch(List<String> workOrderIds);

    /**
     * 移库过账
     * @param inWorkOrderId:入库工单ID
     * @param outWorkOrderId:出库工单ID
     *
     */
    void post(String inWorkOrderId, String outWorkOrderId,Boolean isUpdateStockQty);

    void resetStockBatch(List<Stock> stocks);

    /**
     * 重新计算订单价格
     *
     * @param workOrderId
     */
    void calculateOrderPrice(String workOrderId);

    TraceBackDTO getListBySN(String sn);

    List<Stock> addStockBatchForPack(WorkOrder workOrder, List<WorkOrderItem> workOrderItemList);
}
